import java.util.Scanner;

/**
 * Created by abdulazizalonizi on 7/31/17.
 */
public class Task2 {
    public static void main (String [] args)
    {
        Scanner kb = new Scanner (System.in);
        System.out.println("enter a key to search for ");
        int key = kb.nextInt();
        int [][] arr1 ={{1,2,3,4},{20,32,42,33},{32,30,45,22},{95,11,12,3133}};
        int r =0 ;
        int c =0 ;
        boolean flag = false;

        for ( r = 0 ; r <arr1.length ;r++)
        {
            for (c = 0 ; c <arr1[r].length ;c++  )
            {

                if (( arr1[r][c]) ==key)
                {
                    flag = true;
                    break;
                }

            }
        }
        if(flag)
        System.out.println("key found at row "+ r +" column " +c);
        else
            System.out.println("key not found ");






    }
}
